package io.zhengsh.juc._2synchronized1.status;

public class CoarseningLockTest {

    static Object object = new Object();

    public static void main(String[] args) {

//        for (int i=0 ; i <10; i++) {
//            synchronized (object) {
//                System.out.println(1);
//            }
//        }
    }

    public String conStr(String x, String y) {
        String s = "";
        synchronized (s) {
            s += x;
        }
        synchronized (s) {
            s += y;
        }
        return s;
    }
}
